<!DOCTYPE html>
<html lang="zh-CN">

	<head>
		<meta charset="UTF-8">
		<title>商品配置管理</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="stylesheet" href="assets/css/bootstrap.css">
		<script type="text/javascript" src="/assets/js/address.js"></script>
		<script type="text/javascript" src="assets/js/jquery-3.3.1.js"></script>

	</head>

	<body>
		<div class="container-fluid">
			<div class="row">
				<div class="col-md-12">
					<div class="input-group">
						<h3>
							<span class="glyphicon glyphicon-briefcase" aria-hidden="true">	
								商品配置管理
							</span>
						</h3>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-md-12">
					<font color="#FF0000">新增商品配置</font>
					<div class="table-responsive">
						<table class="table " id="address_add">
							<tbody>
								<tr class="odd gradeC">
									<td>
										<font color="red">*</font>颜色&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										<input type="text" id="color" name="color"></td>
								</tr>

								<tr class="even gradeC">

									<td>
										<font color="red">*</font>规格&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										<input type="text" id="config_spec" name="config_spec">
									</td>
								</tr>
								<tr class="even gradeC">
									<td>
										<font color="red">*</font>库存&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										<input type="text" id="conf_number" name="conf_number">
									</td>
								</tr>
								<tr class="even gradeC">
									<td>
										<font color="red">*</font>售价&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										<input type="text" id="selling_price" name="selling_price">
									</td>
								</tr>
								<tr class="even gradeC">
									<td>
										<font color="red">*</font>进价&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										<input type="text" id="purchase_price" name="purchase_price">
									</td>
								</tr>
								<tr class="even gradeC">
									<td>
										<font color="red">*</font>积分&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										<input type="text" id="earn_integral" name="earn_integral">
									</td>
								</tr>
								<tr class="even gradeC">
									<td>
										<input type="submit" value="保存" id="save_config" name="save_config" class="btn btn-warning" onclick="return isNull();">

									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-md-12">
				<!-- 分类列表--bootstrap高级表格使用 -->
				<div class="panel panel-default">
					<div class="panel-heading">
						<font color="#FF0000">商品配置列表</font>

					</div>
					<div class="panel-body">

						<!--table-responsive响应式表格，会自动添加滚动条-->
						<div class="table-responsive">
							<table class="table table-striped table-bordered table-hover" name="goods_configruation" style="border:hidden;">
								<thead>
									<tr>
										<th>选择款式</th>
										<th>颜色</th>
										<th>规格</th>
										<th>库存</th>
										<th>进价</th>
										<th>售价</th>
										<th>可得积分</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<tr class="odd gradeC" style="border:hidden;">
										<td><input type="radio" name="choice" checked="checked"></td>
										<td>白色</td>
										<td>大</td>
										<td>5</td>
										<td>200</td>
										<td>500</td>
										<td>20</td>
										<td>
											<a id="modify" title="修改" class="t-edit glyphicon glyphicon-pencil" href="#"></a> &nbsp&nbsp&nbsp
											<a id="delete" title="删除" class="t-del glyphicon glyphicon-trash"></a>
										</td>
									</tr>
									<tr class="even gradeC" style="border:hidden;">
										<td><input type="radio" name="choice"></td>
										<td>红色</td>
										<td>中</td>
										<td>4</td>
										<td>20</td>
										<td>50</td>
										<td>10</td>
										<td>
											<a id="modify" title="修改" class="t-edit glyphicon glyphicon-pencil" href="#"></a> &nbsp&nbsp&nbsp
											<a id="delete" title="删除" class="t-del glyphicon glyphicon-trash"></a>
										</td>
									</tr>
									<tr class="even gradeC" style="border:hidden;">
										<td><input type="radio" name="choice"></td>
										<td>黑色</td>
										<td>小</td>
										<td>10</td>
										<td>200</td>
										<td>250</td>
										<td>15</td>
										<td>
											<a id="modify" title="修改" class="t-edit glyphicon glyphicon-pencil" href="#"></a> &nbsp&nbsp&nbsp
											<a id="delete" title="删除" class="t-del glyphicon glyphicon-trash"></a>
										</td>
									</tr>
									
									<tr class="even gradeC">
										<td colspan="8">
											<br />
											<a href="goods_manmage">
												<input id="confirm" name="confirm" type="button" value="确定" class="btn btn-info" />
											</a>
										</td>
									</tr>

								</tbody>
								
							</table>

						</div>

						<!--</div>-->
					</div>
				</div>
				<!--表格结束 -->
			</div>
		</div>
		<script type="text/javascript">
			function isNull() {
				var color = document.getElementById("color").value; //通过id获取需要验证的表单元素的值
				var config_spec = document.getElementById("config_spec").value;
				var conf_number = document.getElementById("conf_number").value;
				var selling_price = document.getElementById("selling_price").value;
				var purchase_price = document.getElementById("purchase_price").value;
				var earn_integral = document.getElementById("earn_integral").value;

				if(color == "") { //当上面获取的值为空时
					alert("商品颜色不能为空哦！"); //弹出提示
					return false; //返回false（不提交表单）
				}
				if(config_spec == "") {
					alert("商品规格不能为空哦！");
					return false;
				}
				if(conf_number == "") {
					alert("商品库存不能为空哦！");
					return false;
				}
				if(selling_price == "") { //当上面获取的值为空时
					alert("商品售价不能为空哦！"); //弹出提示
					return false; //返回false（不提交表单）
				}
				if(purchase_price == "") { //当上面获取的值为空时
					alert("商品进价不能为空哦！"); //弹出提示
					return false; //返回false（不提交表单）
				}
				if(earn_integral == "") { //当上面获取的值为空时
					alert("获得积分不能为空哦！"); //弹出提示
					return false; //返回false（不提交表单）
				}

				return true; //提交表单
			}
		</script>

	</body>

</html>